<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class Family extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'family';

    public function user() {
        return $this->hasMany(User::class, 'family_id', 'id');
    }

    public static function selector() {
        return self::get()->pluck('name', 'id')->toArray();
    }
}
